<?php

use Illuminate\Support\Facades\Route;

/**
 * 王龙路由
 */
Route::group(['namespace' => 'Api\v1'], function () {
    // 注册
    Route::post('/register', [\App\Http\Controllers\Api\v1\RegisterBackController::class, 'RegisterIndex']);
    // 登录
    Route::post('/login', [\App\Http\Controllers\Api\v1\RegisterBackController::class, 'loginIndex']);
});

Route::group(['namespace' => 'Api\v1', 'middleware' => ['auth', 'Admin']], function () {
    // 身份认证
    Route::get('managerLogin', [\App\Http\Controllers\Api\v1\MangerLoginController::class, 'attemptLogin']);
});

Route::group(['namespace' => 'Api\v1'], function () {

    // 经纪人后台管理
    Route::get('/broker', [\App\Http\Controllers\Api\v1\BrokerController::class, 'brokerShow']);
    // 删除
    Route::get('/broDel', [\App\Http\Controllers\Api\v1\BrokerController::class, 'brokerDel']);
    //查找
    Route::post('/brokerSearch', [\App\Http\Controllers\Api\v1\BrokerController::class, 'brokerSearch']);
    // 修改
    Route::get('/brokerUpdate', [\App\Http\Controllers\Api\v1\BrokerController::class, 'brokerUpdate']);

    // 租房后台管理
    Route::get('/house', [\App\Http\Controllers\Api\v1\HouseController::class, 'houseShow']);

    Route::get('/houseDeaTe', [\App\Http\Controllers\Api\v1\HouseController::class, 'houseDeaTe']);

    //查找
    Route::post('/houseSearch', [\App\Http\Controllers\Api\v1\HouseController::class, 'houseSearch']);
    // 删除
    Route::get('/houseDel', [\App\Http\Controllers\Api\v1\HouseController::class, 'houseDel']);
    // 修改
    Route::post('/houseUpdate', [\App\Http\Controllers\Api\v1\HouseController::class, 'houseUpdate']);

    // 房源推荐列表
    Route::get('/houseReCometList', [\App\Http\Controllers\Api\v1\HouseReComet::class, 'houseReCometList']);
    //楼盘人气排行
    Route::get('/houseRanking', [\App\Http\Controllers\Api\v1\HouseController::class, 'houseController']);
    //房东列表展示
    Route::get('/houseList', [\App\Http\Controllers\Api\v1\HouseController::class, 'houseList']);
    //房屋上架人工审核
    Route::post('/houseAuth', [\App\Http\Controllers\Api\v1\HouseController::class, 'houseAuth']);
    // 选择看房时间
    Route::post('/lookHouse', [\App\Http\Controllers\Api\v1\HouseController::class, 'lookHouse']);
    // 小区列表展示
    Route::get('estateHouse', [\App\Http\Controllers\Api\v1\HouseController::class, 'estateHouse']);
    // 排行榜多条件搜索
    Route::post('allSearch', [\App\Http\Controllers\Api\v1\HouseReComet::class, 'allSearch']);
    // 策略模式支付方式
    Route::get('rentPay', [\App\Http\Controllers\Api\v1\Renting::class, 'rentPay']);
    // 授权登录
    Route::get('registerIndex', [\App\Http\Controllers\Api\v1\Register::class, 'registerIndex']);
});
